package denkmalVerwaltungstool.backend.fileHandler;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Vector;

/**
 * $Author: vinculum $
 * $Revision: 1.1 $
 *  
 */
public class FRead {
	
	private FileReader reader;
	protected static final int BLKSIZ = 8192;
	
	
	/**
	 * 
	 * @param source
	 */
	public FRead(File source){
		try {
			this.reader = new FileReader(source);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	/**
	 * @return the lines
	 */
	
	
	public String readerToString() throws IOException {
		
		StringBuffer sb = new StringBuffer();
	    BufferedReader in = new BufferedReader(reader);
	    String s;
	    while((s = in.readLine()) != null) {
	      sb.append(s);
	      sb.append("\n");
	    }
	    in.close();
	    return sb.toString();
	}
}
